#include<iostream>
#include<ctype.h>
#include<string>

using namespace std;

string s, t;

void solve() { 
   int index = 0;
   int position;
   for(int i=0; i<s.length();i++) {
      position = t.find(s[i], index);
      if(position <= t.length())
         index = position+1;
      else {
         cout << "No" << endl;
         return;
      }
   }
   cout << "Yes" << endl;
}

void read() {
   while(cin >> s >> t) {
      solve();
   }
}

int main() {
   read();
   return 0;
}
